import axios from 'axios';
axios.defaults.baseURL='http://localhost:3000';
 
//登陆接口
export const adminlogin = (params)=>axios.post("/admin/login",params);

// //getlist
export const showadmin =(params= {pageSize:10,pageNumber:1})=>axios.get('/admin',params)
 
//添加
export const addadmin =(params)=>axios.post('/admin',params)


//删除
export const deleteadmin =(id)=>axios.delete(`/admin?id=${id}`,);
//获取id
export const getadminId =(id)=>axios.get(`/admin/:_id?id=${id}`,);
//更新
export const updateadmin =(params)=>axios.put(`/admin`,params);